package com.lyw.GeoLocationClient.service;

import com.lyw.GeoLocationClient.json.res.GeotableList;
import com.lyw.GeoLocationClient.json.res.PoiList;
import com.lyw.GeoLocationClient.json.res.Respon;
import retrofit.Callback;
import retrofit.http.*;

public interface LBSService {
    @FormUrlEncoded
    @POST("/geotable/create")
    void createTable(@Field("name") String name, @Field("sn") String password, @Field("geotype") int type,
                     @Field("is_published") int published, @Field("ak") String ak, Callback<Respon> cb);


    @FormUrlEncoded
    @POST("/poi/create")
    void createPoi(@Field("title") String title, @Field("address") String address,
                   @Field("tags") String tags,
                   @Field("latitude") double lat, @Field("longitude") double lon,
                   @Field("coord_type") int coord_type,
                   @Field("geotable_id") int geotable,
                   @Field("ak") String ak, @Field("sn") String sn, Callback<Respon> handler);

    @GET("/geotable/list")
    void listTable(@Query("name") String name, @Query("ak") String srvAk, Callback<GeotableList> callback);

    @GET("/poi/list")
    void listPoi(@Query("title")String title, @Query("geotable_id")int geotable, @Query("ak")String srvAk,@Query("page_size")int page_size, Callback<PoiList> cb);

    @GET("/poi/list")
    void listPoiByTime(@Query("title")String title, @Query("create_time")String time, @Query("geotable_id")int geotable, @Query("ak")String srvAk,@Query("page_size")int page_size, Callback<PoiList> cb);

    @FormUrlEncoded
    @POST("/poi/delete")
    void delPois(@Field("title") String title, @Field("geotable_id") int geotable, @Field("ak") String srvAk, @Field("is_total_del") int table_del, Callback<Respon> handler);

}
